package com.txm.exception;

/**
 * Created by tangxinmao on 2017/3/13.
 * 自定义异常
 */
public class MyException extends  RuntimeException {
    private int code;
    private boolean result;
    public MyException(String message,int code) {
        super(message);
        if(code==0){
            result=true;
        }
        this.code=code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }
}
